---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py in _MaybeCompile(scope, op, func, grad_fn)
362 try:
--> 363 xla_compile = op.get_attr("_XlaCompile")
364 xla_separate_compiled_gradients = op.get_attr(
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py in get_attr(self, name)
1518 raise ValueError("No attr named '" + name + "' in " +
-> 1519 str(self._node_def))
1520 x = self._node_def.attr[name]
ValueError: No attr named '_XlaCompile' in name: "LSTM_1/LSTM_1/BasicLSTMCell_147/add"
op: "Add"
input: "LSTM_1/LSTM_1/BasicLSTMCell_147/Linear/MatMul"
input: "LSTM_1/LSTM_1/BasicLSTMCell/Linear/Bias/read"
attr {
key: "T"
value {
type: DT_FLOAT
}
}
During handling of the above exception, another exception occurred:
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-17-c1bdec795c87> in <module>()
11 RNN = tflearn.regression(RNN, optimizer='adam', loss='categorical_crossentropy', name="output")
12
---> 13 model = tflearn.DNN(RNN, tensorboard_verbose=1)
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tflearn\models\dnn.py in __init__(self, network, clip_gradients, tensorboard_verbose, tensorboard_dir, checkpoint_path, best_checkpoint_path, max_checkpoints, session, best_val_accuracy)
62 max_checkpoints=max_checkpoints,
63 session=session,
---> 64 best_val_accuracy=best_val_accuracy)
65 self.session = self.trainer.session
66
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tflearn\helpers\trainer.py in __init__(self, train_ops, graph, clip_gradients, tensorboard_dir, tensorboard_verbose, checkpoint_path, best_checkpoint_path, max_checkpoints, keep_checkpoint_every_n_hours, random_seed, session, best_val_accuracy)
129 train_op.initialize_training_ops(i, self.session,
130 tensorboard_verbose,
--> 131 clip_gradients)
132
133 # Saver for saving a model
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tflearn\helpers\trainer.py in initialize_training_ops(self, i, session, tensorboard_verbose, clip_gradients)
656 # Compute gradients operations
657 with tf.control_dependencies([loss_avg_op, acc_avg_op]):
--> 658 self.grad = tf.gradients(total_loss, self.train_vars)
659 if clip_gradients > 0.0:
660 self.grad, self.grad_norm = \
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py in gradients(ys, xs, grad_ys, name, colocate_gradients_with_ops, gate_gradients, aggregation_method)
558 # functions.
559 in_grads = _MaybeCompile(
--> 560 grad_scope, op, func_call, lambda: grad_fn(op, *out_grads))
561 else:
562 # For function call ops, we add a 'SymbolicGradient'
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py in _MaybeCompile(scope, op, func, grad_fn)
366 xla_scope = op.get_attr("_XlaScope").decode()
367 except ValueError:
--> 368 return grad_fn() # Exit early
369
370 if not xla_compile:
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py in <lambda>()
558 # functions.
559 in_grads = _MaybeCompile(
--> 560 grad_scope, op, func_call, lambda: grad_fn(op, *out_grads))
561 else:
562 # For function call ops, we add a 'SymbolicGradient'
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\ops\math_grad.py in _AddGrad(op, grad)
597 sy = array_ops.shape(y)
598 rx, ry = gen_array_ops._broadcast_gradient_args(sx, sy)
--> 599 return (array_ops.reshape(math_ops.reduce_sum(grad, rx), sx),
600 array_ops.reshape(math_ops.reduce_sum(grad, ry), sy))
601
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py in reduce_sum(input_tensor, axis, keep_dims, name, reduction_indices)
1234 _ReductionDims(input_tensor, axis, reduction_indices),
1235 keep_dims,
-> 1236 name=name)
1237
1238
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_math_ops.py in _sum(input, reduction_indices, keep_dims, name)
2654 result = _op_def_lib.apply_op("Sum", input=input,
2655 reduction_indices=reduction_indices,
-> 2656 keep_dims=keep_dims, name=name)
2657 return result
2658
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py in apply_op(self, op_type_name, name, **keywords)
766 op = g.create_op(op_type_name, inputs, output_types, name=scope,
767 input_types=input_types, attrs=attr_protos,
--> 768 op_def=op_def)
769 if output_structure:
770 outputs = op.outputs
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py in create_op(self, op_type, inputs, dtypes, input_types, name, attrs, op_def, compute_shapes, compute_device)
2336 original_op=self._default_original_op, op_def=op_def)
2337 if compute_shapes:
-> 2338 set_shapes_for_outputs(ret)
2339 self._add_op(ret)
2340 self._record_op_seen_by_control_dependencies(ret)
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py in set_shapes_for_outputs(op)
1717 shape_func = _call_cpp_shape_fn_and_require_op
1718
-> 1719 shapes = shape_func(op)
1720 if shapes is None:
1721 raise RuntimeError(
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py in call_with_requiring(op)
1667
1668 def call_with_requiring(op):
-> 1669 return call_cpp_shape_fn(op, require_shape_fn=True)
1670
1671 _call_cpp_shape_fn_and_require_op = call_with_requiring
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\framework\common_shapes.py in call_cpp_shape_fn(op, input_tensors_needed, input_tensors_as_shapes_needed, debug_python_shape_fn, require_shape_fn)
608 res = _call_cpp_shape_fn_impl(op, input_tensors_needed,
609 input_tensors_as_shapes_needed,
--> 610 debug_python_shape_fn, require_shape_fn)
611 if not isinstance(res, dict):
612 # Handles the case where _call_cpp_shape_fn_impl calls unknown_shape(op).
C:\Users\Shachi Shah\Anaconda3\lib\site-packages\tensorflow\python\framework\common_shapes.py in _call_cpp_shape_fn_impl(op, input_tensors_needed, input_tensors_as_shapes_needed, debug_python_shape_fn, require_shape_fn)
669 output = pywrap_tensorflow.RunCppShapeInference(
670 graph_def_version, node_def_str, input_shapes, input_tensors,
--> 671 input_tensors_as_shapes, status)
672 except errors.InvalidArgumentError as err:
673 if err.message.startswith("No shape inference function exists for op"):
KeyboardInterrupt: